home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / utils / zdiff1.arj / ZDIFF.DOC < prev    next >
Text File  |  1993-09-16  |  19KB  |  459 lines

  1.  
  2.  
  3.                                  ZDIFF v1.3
  4.                        The Archive/Directory comparison
  5.  
  6.                               Shareware program
  7.                       Copyright 1993, Christophe Dubourg
  8.                           Date : 16 September 1993
  9.  
  10.                                    ---*---
  11.  
  12.                               Table of contents
  13.  
  14.                       1 ........................Purpose
  15.                       2 ........................ Syntax
  16.                       3 ...................... Features
  17.                       4 .................. How it works
  18.                       5 ........................ Limits
  19.                       6 ....................... Remarks
  20.                       7 .................... Disclaimer
  21.                       8 ..... How to contact the author
  22.  
  23.                                    ---*---
  24.  
  25.  
  26.  
  27.  
  28. 1. Purpose :
  29. ------------
  30.  
  31.         ZDiff is a comparison utility program.
  32.  
  33.         You can compare a pair of archives, or a pair of directories, or
  34.         an archive and a directory. (that's the new of this !)
  35.         You obtain a sorted list of all the files, along with a status
  36.         line, showing the differences, if any.
  37.  
  38.         ■ ZDIFF.EXE is the normal DOS version.
  39.         
  40.         ■ ZDIFFD.EXE is the DPMI hosted version.
  41.           It permits a larger amount of files to be treated. (up to 16380)
  42.  
  43.  
  44. 2. Syntax :
  45. -----------
  46.  
  47.   ZDIFF <New Archive/Directory> <Old Archive/Directory>
  48.  
  49.         or
  50.  
  51.   ZDIFF <New Archive/Directory> <Old Archive/Directory> [options] [wildcards]
  52.  
  53.  
  54.         Note : To simplify the following, the archive or directory that
  55.         is compared to an other archive or directory will be called a
  56.         Set of files. There is a NEW set of files, and an OLD set of files.
  57.         (to determine the one that is Newer and the one that is Older,
  58.         for instance).
  59.  
  60.         The <New archive/directory> and <Old archive/directory> parameters
  61.         are needed (not optional).
  62.  
  63.         The order in which you specify the New/Old pair is important.
  64.         It will make the difference between a 'Deleted' file or 'Inserted'
  65.         file, or a 'Newer' and 'Older', or 'Bigger' and 'Smaller'.
  66.         (In fact, it will determine the output result)
  67.  
  68.                 
  69.                 The NEW set of files must be specified first.
  70.                 ---------------------------------------------
  71.  
  72.  
  73.         Then, you may specify wildcards if you need.
  74.  
  75.         a. Wildcards
  76.  
  77.         The wildcards may be used to restrict the files compared inside
  78.         the directory or archive. (for both the new and old sets, because
  79.         it would be unlogical to have two different wildcards).
  80.         The DOS standard wildcards are allowed.
  81.  
  82.         b. Options
  83.  
  84.         The options may be specified anywhere on the command line, and are
  85.         not case sensitive. The options are :
  86.  
  87.           /b  :  Batch output.
  88.  
  89.         Only the file names are output to standard output.
  90.         You may re-use the list as input with an other program.
  91.  
  92.           /c  :  Country flag override.
  93.  
  94.         If the dates in the ZIP files are not well recognized, you may
  95.         use this option to force the date format to use while reading
  96.         ZIP files :
  97.  
  98.             /C0 - USA date format.       (MM/DD/YY)
  99.             /C1 - EUROPEAN date format.  (DD/MM/YY)
  100.             /C2 - JAPANESE date format.  (YY/MM/DD)
  101.  
  102.           /d  :  Differences only.
  103.  
  104.         Once the two sets of files are compared, the output will only show
  105.         the files that are different in the 2 sets.
  106.         (ANY difference : date, size, crc, name...)
  107.         By default, all the files of the two sets are displayed.
  108.  
  109.           /h   :  Help !
  110.  
  111.         This display more help screens, and a copyright screen.
  112.  
  113.           /m   :  Matching files only.
  114.           
  115.         The output will only show the files that are BOTH in the NEW and
  116.         the OLD set of files. Files that are only in the NEW set or only
  117.         in the OLD set (i.e., Deleted or Inserted files) will not be
  118.         shown.
  119.           
  120.           /n   :  No Path in names
  121.  
  122.         With this option, you can compare a directory tree with a single
  123.         directory. Useful to compare a ZIP file that have a directory tree
  124.         stored inside of it, and a directory that contains all the files
  125.         without subdirectories.
  126.  
  127.         Example : to compare to directories, one containing the 'organized'
  128.         procuct, and one containing the 'development' version, like :
  129.  
  130.            New directory : DEV\*.*
  131.  
  132.            Old? directory : CUT\DISK1\*.*
  133.                             CUT\DISK2\*.*
  134.                             CUT\DISK3\*.*         etc...
  135.  
  136.         You can compare these 2 directories with the following command :
  137.  
  138.            ZDIFF /r /n DEV CUT
  139.  
  140.           /p   :  Pause.
  141.  
  142.         With this option, ZDiff will prompt you before reading each set
  143.         of file. The purpose of this is essentially while using floppies.
  144.         For example, if you need to compare two sets that are on two
  145.         different floppies that have the same format, you'll have to insert
  146.         one disk, read the files from it, and then the second disk.
  147.         Maybe, you could compare 2 removable hard disks, or a hard disk
  148.         and an archive, or whatever you want.
  149.         
  150.           /q    :  Quick scan.
  151.           
  152.         If a directory is involved in comparison, this permits to skip the
  153.         CRC calculation on each file of this directory, in order to
  154.         speed up the process. Of course, use this option with caution, 
  155.         since the comparison is made only with TimeStamp and Size !
  156.         (two files can have the same date and time of last modification,
  157.         same size, and be binary different : using this option, they will be
  158.         marked as 'Same').
  159.         However, if the timestamp or size is different, 'Differs' will be
  160.         displayed.
  161.          
  162.           /r  :  Recurse directories.
  163.  
  164.         By default, the subdirectories are not searched, either in the
  165.         archive or the directory file structure. (to save time).
  166.         This switch allows the comparison of the full tree of directories.
  167.         Note : if you don't specify the -r option, the filenames that
  168.         contains a path in the archives are not treated at all.
  169.         A warning is displayed if a path is found in an archive, and you
  170.         have not used the -r option.
  171.  
  172.           /v    :  Verbose output.
  173.  
  174.         This option causes a status to be output at the end of comparison.
  175.         This status report shows the number of files that are :
  176.  
  177.                 - Identical
  178.                 - Different
  179.                 - Newer
  180.                 - Older
  181.                 - Bigger
  182.                 - Smaller
  183.                 - Inserted
  184.                 - Deleted
  185.  
  186.         It may give an idea of the amount of differences between the two
  187.         sets, without having to analyze the whole output.
  188.  
  189.           /z    :  Zpecial messages.
  190.            
  191.         Troubleshooting mode option - display more information while running
  192.         like Country code detected, date used, Zip version...
  193.         It may help if something seems to go wrong (with date format
  194.         detection, for example).
  195.         Please note that using the DPMI version of ZDiff with the RTM
  196.         DPMI server, the Country Code number will be 112, which is false.
  197.         This is because the DOS function used is not supported in this
  198.         DPMI host ; however this doesn't affect the DATE FORMAT detection.
  199.         (See the /C option to override the Date format detection)
  200.  
  201.  
  202. 3. Features :
  203. -------------
  204.         Since this is a comparison program, you will probably want to know
  205.         how it compares the two sets of files :
  206.  
  207.         The keys of comparison are :
  208.  
  209. Name :  If two names of the sets don't match, either one is new or one is
  210.         deleted, depending on the order you specified for the comparison.
  211.         if the -r option is specified, the full filename must match.
  212.  
  213.         Once two files are found in both the 2 sets, a more precise
  214.         comparison occurs. The keys for comparison between two files that
  215.         have the same name are :
  216.  
  217. CRC  :  A 32 bit CRC calculation is made on the files to know if they are
  218.         absolutely identical or not.
  219.         Note : if one of the files is an archive of type LZH, LHA, ARC or
  220.         ZOO, then a 16 bits calculation is done instead, to match the CRC
  221.         that these archives use.
  222.         If the Quick option is set, and one of the 2 sets is a directory,
  223.         no CRC calculation occurs, and files are assumed binary identical.
  224.  
  225. Date :  To know which one is the oldest file, or the newest.
  226.  
  227. Size :  To know which one is the biggest file, or the smallest.
  228.  
  229.  
  230. 4. How it works
  231. ---------------
  232.         To compare two directories, you won't need nothing but ZDIFF.EXE.
  233.         But to compare two archives, or an archive and a directory, you'll
  234.         need the correct unarchiver in your PATH, to access the archives
  235.         you have specified.
  236.  
  237.         The program supports all the current archive formats that are
  238.         commonly used and that I am aware of :
  239.  
  240.                 ZIP, ARJ, LHA, LZH, PAK, ZOO, ARC.
  241.  
  242.         The needed unarchiver, for each extension is :
  243.  
  244.                 *.ZIP     PKUNZIP.EXE   (v1.10 or v2.04)
  245.  
  246.                 *.ARJ     ARJ.EXE       (v2.30)
  247.  
  248.                 *.LHA \
  249.                 *.LZH  -  LHA.EXE       (v2.12)
  250.                 *.PAK /
  251.  
  252.                 *.ZOO     ZOO.EXE       (v2.1)
  253.  
  254.                 *.ARC     PKUNPAK.EXE   (v3.61)
  255.                 
  256.         (each of these can be easily found on many BBS)
  257.  
  258.         Now, here how it works :
  259.         The program first checks if the archive or directory that you
  260.         specified exists. (to prevent an error after some precious seconds
  261.         of calculation). At this points, it decides if a 32 bit or 16 bit
  262.         calculation will occur (or no crc, if Quick mode is set).
  263.         Then, it analyze the NEW set, and then the OLD set.
  264.         Two choices, concerning each set of file :
  265.  
  266.         a. If it's an archive:
  267.  
  268.         The unarchiver is called, to obtain a list of each file in the
  269.         archive, along with the date, crc, size, and so on.
  270.         This list is saved in a temporary file.
  271.         (Using the TEMP environment variable if available)
  272.         Then, the temporary file is opened, and scanned for each file in it.
  273.         Since all the informations are already calculated by the unarchiver,
  274.         there's nothing to compute (the crc is already there).
  275.         
  276.         If this is NEW files, each file name is stored in memory, along with
  277.         all the informations needed to compare later.
  278.         If this is OLD files, a search is made in memory, to see if the file
  279.         already exists in the NEW directory. If yes, the comparison occurs,
  280.         and the status is updated accordingly. If not, the file information
  281.         is simply stored.
  282.  
  283.         b. If it's a directory:
  284.  
  285.         The directory is scanned, and all the files are opened, to obtain
  286.         the date, time, size, and a CRC calculation occurs.
  287.         (except if the Quick mode is set).
  288.         Each file entry is then treated like the archive file entry :
  289.         if NEW, then the information is just stored. If OLD, the file is
  290.         searched in memory, and then either added or updated in the list.
  291.  
  292.  
  293.         After all the files have been read (the NEW set and the OLD set of
  294.         files), the sorted list is sent to standard output.
  295.         Since you can redirect standard output, you could use this facility
  296.         to pipe the output to a finder program (FIND), or a viewer program
  297.         (LIST), or any filter program of your choice.
  298.  
  299.         
  300.         Here are some examples :
  301.  
  302.         1.  ZDIFF NEWARC.ZIP OLDARC.ARJ | more
  303.  
  304.             This display the output via DOS's more command.
  305.             (if the archive contains sub-dirs, they are not included,
  306.             since no -r parameter is there - instead, you'll obtain a
  307.             warning while running ZDiff).
  308.  
  309.         2.  ZDIFF /r NEWARC.ZIP OLDDIR *.DOC | FIND "Newer" | LIST /s
  310.  
  311.             This display, via the LIST viewer, all the NEW files in
  312.             NEWARC.ZIP, compared to OLDDIR directory.
  313.             Subdirectories are scanned, too.
  314.             Only the .DOC files are processed.
  315.  
  316.         3.  ZDIFF NEWZIP.ZIP . -r -q -c1
  317.         
  318.             This output on screen the differences between the archive
  319.             NEWZIP.ZIP and the current directory, and the subdirectories.
  320.             A Quick scan (-q) of directories will be made (no CRC), so
  321.             the comparison will be made on date, time and size only.
  322.             The date format used by PKUNZIP on this machine (-c) is the
  323.             EUROPEAN date format (DD/MM/YY).
  324.  
  325.         4.  ZDIFF -v . -r OLDARC.LHA /d /q -m
  326.         
  327.             This output on screen the differences between the current
  328.             directory and the archive OLDARC.LHA. Subdirs are scanned also.
  329.             A Verbose (-v) status is displayed at end of comparison.
  330.             Only the differences are shown (/d), and no CRC is calculated.
  331.             Only the matching files of the two sets (-m) are displayed.
  332.             
  333.                         
  334. 5. Limits :
  335. -----------
  336.         
  337.       ■ ZDIFF.EXE :
  338.         All the files informations are stored in DOS memory. (no EMS)
  339.         It permits between about 5500 to 9900 files to be stored, depending
  340.         on the path length - this is much enough for everyday use,
  341.         I guess.
  342.         
  343.       ■ ZDIFFD.EXE :
  344.         All the files informations are stored in the GLOBAL memory. (DPMI)
  345.         So, you can virtually store as many files that you have
  346.         memory free, up to 16380 files at one time in memory.
  347.         You need Windows or any other DPMI server, like Borland's RTM.EXE
  348.         and DPMI16BI.OVL.
  349.         Note : Borland DPMI server can be found on Compuserve :
  350.         GO BORFORUMS, then choose 'Borland Pascal forum'.
  351.         Then, choose the 'From Borland' library section, and download
  352.         the file called NEWRTM.ZIP.
  353.  
  354.       ■ Note concerning the archives : if the -r option is not specified,
  355.         the files containing a path in their name are not included in the
  356.         comparison. Only the files in the main directory of the archive
  357.         are treated, and only the files in the specified directory are
  358.         specified also.
  359.         However, a warning is displayed if a directory path is found in
  360.         an archive, and you haven't specified the -r option.
  361.  
  362.  
  363. 6. Remarks
  364. ----------
  365.         I made my possible to make this program free of bugs, but if ever
  366.         something is wrong with ZDIFF, tell me. I'll fix it ASAP.
  367.         
  368.         Please notice that ZDiff supports international information from DOS,
  369.         since PKUNZIP does. (it concerns the date format, used for
  370.         time comparison, that is different in US than in France, for
  371.         example). The DOS Country information is read for this purpose.
  372.         The 3 date formats that exists are USA, European and Japanese.
  373.         If ever the comparison of dates seems to be wrong in ZDiff,
  374.         you can override (with the /C option) this state of thing, to
  375.         set a date format to use on your machine. See the 'Syntax' section.
  376.         
  377.         Note : if you use the /Z option to display technical information,
  378.         the country information reported by ZDIFFD.EXE will be 112 instead
  379.         of the correct country number, if you use the Borland DPMI RTM ;
  380.         The date format, however, will be correctly detected and used.
  381.         This is because this function is not supported in RTM. The correct
  382.         country number will be correctly obtained, running ZDiffD under
  383.         Windows DPMI.
  384.  
  385.         Since ZDiff writes a few temporary data on your hard disk (in your
  386.         temp directory), you should not reboot while ZDiff is running,
  387.         as this could result in lost sectors. (CHKDSK /F corrects it)
  388.         Just use Ctrl-Break if you want to abort the program.
  389.  
  390.  
  391. 7. Disclaimer
  392. -------------
  393.         Even if there is really no possibility for this program to
  394.         damage your data, here is the usual disclaimer message :
  395.  
  396.         As a shareware program, ZDIFF is distributed as-is.
  397.         The author disclaims all warranties, expressed or implied.
  398.         The author will assume no liability for damages either from the
  399.         direct use of this product or as a consequence of it's use.
  400.  
  401.         PKUNZIP, PKUNPAK, ZIP, ARJ, ZOO, PAK, LZH, LHARC, LHA are
  402.         copyrighted by their respective authors.
  403.  
  404.  
  405. 8. How to contact the author
  406. ----------------------------
  407.         If you like this program, and plan to use it, you may try it
  408.         during a 21 days period, after what I would appreciate a donation
  409.         from you.
  410.         I develop many tools for my own use, (this one helps me a lot!)
  411.         and I would like to share what I do with others.
  412.         If users gives me money, it will be a proof that my tools are
  413.         useful : in this case, I'll spend more time to update them, and
  414.         adding features.
  415.  
  416.         Of course, you can send what you want, but I would like to precise
  417.         that when I want to have a Dollar check paid in my bank, it costs
  418.         me $11 (I live in France). So, if you want to send money, please
  419.         consider this, and send more than $11 !  ($20 would be good)
  420.  
  421.         An other option is sending cash notes in an enveloppe. If you
  422.         can do that, please send about $10 or more.
  423.  
  424.                         **   Thanks in advance.   **
  425.  
  426.               -------------------------------------------------
  427.               HERE IS MY ADDRESS         Christophe Dubourg
  428.               FOR MAIL, CHECKS, or       23, rue Victor Hugo
  429.               CASH :                     78370 PLAISIR
  430.                                          FRANCE
  431.               -------------------------------------------------
  432.  
  433.  
  434.   -->   Even if you don't send money, please feel free to send me your
  435.         remarks, suggestions, and specific problems encountered with
  436.         this program.
  437.  
  438.         It will be a pleasure to read your mail and to answer it !
  439.  
  440.         Don't hesitate to contact me, at the following addresses :
  441.  
  442.         ---------------------------------------------------------------
  443.         Compuserve                :   73233,1412 (Christophe Dubourg)
  444.                                       or 73233,1412@compuserve.com
  445.  
  446.         MCI Mail                  :   CDUBOURG  (453-6013)
  447.                                       or cdubourg@mcimail.com
  448.  
  449.         Internet                  :   cdubourg@borland.com
  450.  
  451.         At home (paper Mail)      :   Christophe Dubourg
  452.                                       23, rue Victor Hugo
  453.                                       78370 PLAISIR
  454.                                       FRANCE
  455.         ---------------------------------------------------------------
  456.  
  457.         Thanks for using ZDiff, I hope it helps.          //ChD
  458.  
  459.